-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DummyBox #1120
Add DummyBox #1120
Conversation
4986a83
to
a55a444
Compare
a55a444
to
c527262
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Only a few minor comments
"required": [ | ||
"n_qubits", | ||
"n_bits", | ||
"resource_data" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might also need to define resource_data
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually not sure how to do this. It's a fairly complex structure and I can't find any other examples of serialized objects containing "dictionaries" that I can use as a model. Do you know? (And should we have a test that checks the schema is complete?)
op_type_count = resource_data1.get_op_type_count() | ||
assert op_type_count[OpType.T].get_min() == 10 | ||
assert op_type_count[OpType.T].get_max() == 20 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also call json_validate
on c
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
tket/src/Circuit/Circuit.cpp
Outdated
} else { | ||
data.GateDepth = {1}; | ||
data.OpTypeDepth[optype] = {1}; | ||
if (OpDesc(optype).n_qubits() == 2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How should we treat types with dynamic n_qubits? e.g. CnRy, boxes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to check for actual number of qubits.
No description provided.